package com.momo.web.controller.sysSetting;

import com.momo.common.common.JSONResult;
import com.momo.common.req.sysmain.RedisUser;
import com.momo.task.website.TebsiteVisitTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by MOMO on 2019/4/24.
 */
@RestController
@RequestMapping(value = "/platform/website", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@Slf4j
public class TebsiteVisitTaskController {
    @Autowired
    private TebsiteVisitTask tebsiteVisitTask;

    @RequestMapping("/visitPeople/v1")
    public JSONResult userPage(@RequestBody RedisUser redisUser) {
        Long aa= tebsiteVisitTask.visitPeople();
        return JSONResult.ok(aa);
    }
    @RequestMapping("/visitPeopleToRedis/v1")
    public JSONResult visitPeopleToRedis(@RequestBody RedisUser redisUser) {
        return tebsiteVisitTask.visitPeopleToRedis();
    }
}
